﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using AD.DAL;
using AD.Model;

namespace AD.BLL
{
    public class InviteFlowBLL : BLLBase
    {
        public static IList<InviteFlowMod> QueryByPage(string filter, int pageSize, int index, out int maxcount)
        {
            return InviteFlowDAL.QueryByPage(filter, pageSize, index, out maxcount);
        }

        public static IList<InviteFlowMod> QueryById(int id)
        {
            string filter = " AutoID=" + id;
            return QueryFilterToList(filter);
        }

        public static IList<InviteFlowMod> QueryByUserId(int userId)
        {
            string filter = " UserId=" + userId;
            return QueryFilterToList(filter);
        }

        public static IList<InviteFlowMod> QueryFilterToList(string filter)
        {
            return InviteFlowDAL.QueryFilterToList(filter);
        }

        public static InviteFlowMod CheckIP(InviteFlowMod inviteFlow)
        {
            return InviteFlowDAL.CheckIP(inviteFlow);
        }

        public static int Insert(InviteFlowMod inviteFlow, out int errorCode)
        {
            errorCode = -1;
            return InviteFlowDAL.Insert(inviteFlow);
        }

        public static DataTable QueryFilterToTable(string filter)
        {
            return InviteFlowDAL.QueryFilterToTable(filter);
        }
    }
}